$def with (page=None)

$ show_ol_shell = ctx.get('show_ol_shell', True)

<!--For analytics-->
$ stats = stats_summary()
$ raw_time = stats.get('total', {}).get('time') # Assumes that if total present, it's a dict
$if raw_time is not None:
  $ total_time = float(raw_time) * 1000
$else:
  $ total_time = 0

$if show_ol_shell:
  <div class="clearfix"></div>

$if ("stats" in ctx.features) and query_param('debug'):
    $:render_template("site/stats")

$if show_ol_shell:
  $:render_template("lib/nav_foot", page)

<script src="/cdn/archive.org/analytics.js" type="text/javascript"></script>
<script src="$static_url('build/all.js')" type="text/javascript"></script>
<!-- Passes total_time for analytics to ol.analytics.js -->
<div class="analytics-stats-time-calculator" data-time="$total_time"></div>
</body>
</html>
